@import "common/common.module.less";

.topContainer {
  padding: 10px 0;
  display: flex;
  align-items: center;
  margin-bottom: 27.5px;

  .titleSection {
    flex-grow: 1;

    .header {
      .lastAcceptedSubmission {
        vertical-align: top;
        font-size: 0.7em;
        margin-right: 3px;
      }

      .languageSelectIcon {
        margin-left: 10px;
        font-size: 17px;
        vertical-align: top;
      }
    }

    .labels {
      margin-top: -2px;

      :global(.ui.label) {
        margin: 2px !important;
      }
    }

    .toggleTagsLabel {
      user-select: none;

      :global(.icon) {
        cursor: pointer;
        margin-right: 0 !important;
        margin-left: .5em !important;
        font-size: .92857143em !important;
        transition: transform .3s ease;
      }
    }
  }
}

.statistic {
  white-space: nowrap;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  justify-content: center;
  width: 260px;
  flex-shrink: 0;

  @media only screen and (max-width: 1023px) and (min-width: 768px) {
    width: 190px;

    > :global(.ui.statistic) {
      &:first-child {
        margin-right: 1em !important;
      }

      &:not(:first-child) {
        margin-left: 1em !important;
      }
    }
  }

  @media only screen and (max-width: 767px) {
    width: min-content;
    padding-top: 4px;
    padding-bottom: 14px;
    margin: 0 auto !important;
  }

  > :first-child {
    margin-left: 0 !important;
    margin-bottom: 0 !important;
  }
}

.divider {
  margin: 0 0 37.5px calc(50% - 50vw) !important;
  width: 100vw;
}

.statementView {
  display: flex;
  width: 100%;
}

.leftContainer {
  display: flex;
  flex-direction: column;
}

.rightContainer {
  align-self: start;
  position: sticky;
  top: calc(49px + 28px + 10px);
}

:global(#root) .discussionCount {
  background-color: #e8e8e8;
  color: rgba(0, 0, 0, 0.6);
  transform: translateY(calc((100% - 16px) / 2)); // menu height = 16px
}

.secondActionMenu {
  margin-top: 40px !important;

  &:empty {
    margin-top: 0 !important;
  }
}

.sample {
  display: inline-flex !important;
  flex-direction: column;

  &.empty {
    display: none !important;
  }
}

.sampleHeader {
  margin-bottom: 1.5px !important;
}

.sampleDataSegment {
  flex-grow: 1;
  margin-top: 0 !important;
  overflow-x: overlay;
  overflow-y: hidden;
}

.sampleDataPre {
  margin-top: 0;
  margin-bottom: 0;
}

.copySample {
  display: block;
  float: right;
  user-select: none;
}

.sampleExplanation {
  padding-top: 0 !important;
  padding-bottom: 0 !important;

  p {
    margin-bottom: 1em !important;

    &:empty {
      display: none;
    }
  }
}

@media only screen and (max-width: 767px) {
  .topContainer {
    margin-top: 0;
    margin-bottom: 15px;
  }

  .labels {
    white-space: initial;
  }

  .divider {
    margin-bottom: 25px !important;
  }

  .sampleInput {
    padding-right: 0.5rem !important;
  }

  .sampleOutput {
    padding-left: 0.5rem !important;
  }

  .dividerBottom {
    margin-top: 25px !important;
  }

  .statementView {
    display: block;
  }

  .actionMenusWrapper {
    margin-top: 20px !important;
  }

  .secondActionMenu {
    margin-top: 30px !important;

    &:empty {
      margin-top: 0 !important;
    }
  }
}
